console.log('begin');
console.log('end');
setTimeout(() => {
  console.log('setTimeout1')
}, 0);

  //最后入栈的宏任务
new Promise((resolve) => {
  console.log('promise');
  resolve()
}).then(() => {
    console.log('then1');
  }).then(() => {
    console.log('then2');
  });
  new Promise((resolve) => {
    console.log('promise2');
    resolve()
  }).then(() => {
      console.log('then1222');
    }).then(() => {
      console.log('then22222');
    });
console.log('end');